home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0362 / bcsdk.zip / BCHOOK.H < prev    next >
C/C++ Source or Header  |  1995-04-01  |  4KB  |  145 lines

  1. /*
  2.     BarClock(tm)
  3.  
  4.     Keyword Extensions
  5.  
  6.     Copyright (c) 1994-1995  Patrick Breen
  7.     All rights reserved.
  8.  
  9.     Atomic Dog Software
  10.     PO Box 523
  11.     Medford, MA 02155
  12.  
  13.     Phone (617) 396-2673
  14.     Fax   (617) 396-5761
  15.     BBS     (617) 279-3561
  16.  
  17.     Internet:            pbreen@world.std.com
  18.     CompuServe:         70312,743
  19.     America Online:     PBreen
  20.  
  21.     FTP:     ftp.std.com    /vendors/AtomicDog
  22.     WWW:     http://world.std.com/~pbreen
  23. */
  24.  
  25. #ifndef __BCHOOK_H_
  26. #define __BCHOOK_H_
  27.  
  28. #define STRICT
  29. #include <windows.h>
  30.  
  31. // CONSTANTS
  32. #define HOOKVERSION       0x00020000L    // Hook DLL Version
  33. #define IDK_NONE        0            // Not a keyword
  34.  
  35. // Button
  36. #define ID_BASEBUTTON    100
  37.  
  38.  
  39. // DWORD BCHookVersion(DWORD FAR *pSignature);
  40. //
  41. //    Return the hook version constant.  This is used
  42. //     to check for compatibility if the hook DLL format
  43. //    is ever modified.  The return value should always
  44. //    be HOOKVERSION.  The signature should be set to
  45. //    a unique signature value.  This should be a 4-byte
  46. //    character string representing your company.  For
  47. //    example, 'ADOG' for Atomic Dog Software.
  48. DWORD FAR _export BCHookVersion(DWORD FAR *pSignature);
  49.  
  50.  
  51. // BYTE IsKeyword(LPSTR, short FAR *);
  52. //
  53. //     This routine is called to convert text within
  54. //     [ ] into keyword ids.  When the format string
  55. //     is parsed, each keyword will passed through
  56. //     this routine.  If the text represents a keyword
  57. //    that this DLL supports, return a non-zero
  58. //    identifier and set pLen to the length of the
  59. //    keyword text.
  60. BYTE FAR _export IsKeyword(LPSTR pTxt, short FAR *pLen);
  61.  
  62.  
  63. // short ExpandKeyword(BYTE id, LPSTR pOutBuf);
  64. //
  65. //     This routine is called when a string containing
  66. //    a keyword identified by the above routine is
  67. //    displayed.  The id returned by IsKeyword()
  68. //    is passed in to this routine.  The output buffer
  69. //    should be modified to contain the value that the
  70. //    keyword represents and the number of bytes added
  71. //    to the output buffer should be returned.
  72. short FAR _export ExpandKeyword(BYTE id, LPSTR pOutbuf);
  73.  
  74.  
  75. // short KeywordText(BYTE id, LPSTR pOutBuf);
  76. //
  77. //     This routine is called to convert a keyword id
  78. //    into it's textual representation.  The id returned
  79. //    by IsKeyword() is passed in to this routine.
  80. //    The output buffer should be modified to contain the
  81. //    value that the keyword represents and the number of
  82. //    bytes added to the output buffer should be returned.
  83. short FAR _export KeywordText(BYTE id, LPSTR pOutbuf);
  84.  
  85.  
  86. // BYTE BCBtnCount(void);
  87. //
  88. //     Return the number of buttons supported by this DLL.
  89. //    Each DLL can support up to 256 unique buttons (0 - 255).
  90. //    The resource should contain a bitmap or icon for each
  91. //    button.  The identifier for the resource should be the
  92. //    button id (0 - 255) plus 100.  If a resource is not found
  93. //    with the appropriate identifier, resource id 100 is used.
  94. BYTE FAR _export BCBtnCount(void);
  95.  
  96.  
  97. // void BCBtnLabel(short btnId, LPSTR pLabelBuf);
  98. //
  99. //     This routine is called to get the text to
  100. //    display in the tip text window (when the cursor
  101. //    is over the button) and in the BarClock setup
  102. //    dialog listing the available item types
  103. void FAR _export BCBtnLabel(BYTE btnId, LPSTR pLabelBuf);
  104.  
  105.  
  106. // void BCBtnMenu(short btnId, BOOL bLeftClick);
  107. //
  108. //     This routine is called when the user clicks on
  109. //    the button in the title bar.  This routine should
  110. //    return a menu to drop in response to the click or
  111. //    return 0 indicating that no menu should appear.
  112. //     If 0 is returned the BCBtnClick function is called.
  113. HMENU FAR _export BCBtnMenu(BYTE btnId, BOOL bLeftClick);
  114.  
  115.  
  116. // void BCBtnClick(short btnId, BOOL bLeftClick);
  117. //
  118. //     This routine is called when the user clicks on a
  119. //    button that has been added to the title bar.
  120. void FAR _export BCBtnClick(BYTE btnId, BOOL bLeftClick);
  121.  
  122.  
  123. // void BCBtnMenuSelect(short btnId, short itemId);
  124. //
  125. //     This routine is called when the user selects a menu
  126. //    item from a button that has been added to the title bar.
  127. void FAR _export BCBtnMenuSelect(BYTE btnId, short itemId);
  128.  
  129.  
  130.  
  131. // Making BarClock load the .DLL
  132. //
  133. // Modify the BarClock .INI file by adding
  134. // the following lines - the names of the
  135. // .DLLs can be anything you choose so long as
  136. // they each have the functions described
  137. // above.
  138. //
  139. // [Hooks]
  140. // File0=KEYWORD.DLL
  141. // File1=BCADDON.DLL
  142. // ...
  143. //
  144.  
  145. #endif